package com.software.graduationproject.modules.shopping.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.software.graduationproject.commons.select.Select;
import com.software.graduationproject.modules.food.object.FoodVo;
import com.software.graduationproject.modules.marketers.object.MarketersVo;
import com.software.graduationproject.modules.shopping.entity.ShoppingCart;
import com.software.graduationproject.modules.shopping.object.ShoppingCartPocketVo;
import com.software.graduationproject.modules.shopping.object.ShoppingCartVo;
import org.apache.ibatis.annotations.Mapper;
import com.baomidou.mybatisplus.core.metadata.Page;
import org.apache.ibatis.annotations.Param;


import java.util.List;

/**
 * ShoppingCartMapper
 * ---------------------------------------------------------------------------------------------------------------------
 */
@Mapper
public interface ShoppingCartMapper extends BaseMapper<ShoppingCart> {

    Page<ShoppingCartVo> selectPageVo(@Param("select") Select select);

    List<ShoppingCartVo> selectListVo(@Param("select") Select select);

    Integer selectCountByUserId(@Param("select") Select select);

    ShoppingCartPocketVo selectPriceAndNum(@Param("select") Select select);

    FoodVo selectFoodByCartId(@Param("id") Long id);

    MarketersVo selectMarketersByCartId(@Param("id") Long id);
}
